﻿/// <reference group="Dedicated Worker" />
/// <reference path="/js/longrunning.js" />
importScripts("/js/longrunning.js");

onmessage = function (event) {
    var max = event.data.number;
    for (var i = 0; i <= max ; i++) {
        var result = LongRunning.fibonacci(i);
        postMessage({ number: i, result: result });
    }
}
